<template>
	<view class="detailContent public">
		<view class="title">
			{{arr.title}}
		</view>
		<view class="time">
			{{arr.create_time | formatTime}}
		</view>
		<view class="msg">
			{{arr.content}}
		</view>
	</view>
</template>

<script>
	const $api = require('@/utils/request.js').API
	export default {
		data() {
			return {
				arr: []
			}
		},
		onLoad(options) {
			this.messageDetails(options.id)
		},
		methods: {
			messageDetails(id) {
				$api.postMessageDetails({
					token: uni.getStorageSync('token'),
					id: id
				}).then(res => {
					this.arr = res.data.data
				})
			}
		}
	}
</script>

<style>
	.detailContent {
		display: flex;
		flex-direction: column;
		padding: 45rpx;
		background-color: #F9F9F9;
		overflow-y: scroll;
	}

	.title {
		padding: 0 176rpx;
		min-height: 100rpx;
		font-size: 36rpx;
		text-align: center;
		font-family: PingFang SC;
		font-weight: 400;
		color: #171313;
		line-height: 50rpx;
	}

	.time {
		margin-top: 35rpx;
		text-align: left;
		font-size: 20rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #656B6C;
	}

	.msg {
		margin-top: 39rpx;
		width: 659rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #777777;
		line-height: 46rpx;
	}
</style>